<?php
$this->breadcrumbs=array(
	'Users'=>array('index'),
	'Manage',
);
 /* @var $box Box */

$box = $this->beginWidget('application.components.widgets.Box',
         array('title'=>'!group Felhasználók',
                'search'=> array($model, 'filter'),
                 ));


$this->widget('bootstrap.widgets.BootGridView',array(
	'id'=>'user-grid',
	'dataProvider'=>$model->search(),
    'summaryText'=>'',
	'columns'=>array(
		'username',
		'email',
	    array(
	        'name'=>'active',
	        'type'=>'raw',
	         'htmlOptions'=>array('style'=>'width: 20px; text-align: center;'),
	        'filter'=>array(1=>'Igen', 0=>'Nem'),
	        'value'=> '$data->active == 1 ? \'<i class="icon-ok"></i>\' : \'<i class="icon-remove-sign"></i>\''
        ),
		array(
            'class'=>'bootstrap.widgets.BootButtonColumn',
			'template' => '{view} {update} {delete}',
			'buttons' => array(
			      'view' => array(
					'label'=> 'View',
					'options'=>array(
						'class'=>'btn view'
					)
				),
                  'update' => array(
					'label'=> 'Update',
					'options'=>array(
						'class'=>'btn btn-info update'
					)
				),
				'delete' => array(
					'label'=> 'Delete',
					'options'=>array(
                        'url'=> '',
						'class'=>'btn btn-inverse delete'
					)
				)
			),
            'htmlOptions'=>array('style'=>'width: 150px;'),
           ),
	),
));

echo "<hr />";
echo hyperlink('Új felhasználó', array('user/create'), array('class'=>'btn-primary'));


$this->endWidget();

?>

